<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
      label-width="100px"
    >
      <el-form-item label="项目名称" prop="entryName" class="myForm">
        <el-input
          style="width: 200px"
          v-model="queryParams.entryName"
          placeholder="请输入项目名称"
          clearable
          :disabled="true"
        />
      </el-form-item>

      <el-form-item label="型号" prop="model">
        <el-input
          style="width: 300px"
          v-model="queryParams.model"
          placeholder="请输入型号"
          clearable
          :disabled="true"
        />
      </el-form-item>

      <el-form-item label="项目号" prop="entryNo">
        <el-input
          v-model="queryParams.entryNo"
          placeholder="请输入项目号"
          clearable
          :disabled="true"
        />
      </el-form-item>

      <el-form-item label="生产批次" prop="productionBatch">
        <el-input
          v-model="queryParams.productionBatch"
          placeholder="请输入生产批次"
          clearable
          :disabled="true"
        />
      </el-form-item>

      <el-form-item label="生产数量" prop="productionNumber">
        <el-input
          v-model="queryParams.productionNumber"
          placeholder="请输入生产数量"
          clearable
          :disabled="true"
        />
      </el-form-item>
    </el-form>

    <div class="box">
      <p>
        1、开线生产后，一般检验项目按2H/次频次进行巡线抽检，带有特性符号的检验项目（▲）按1H/次频次巡检抽检。
      </p>
      <p>
        2、在巡检记录中填写对应产品流程单相应工序处，按抽检结果在巡检记录中相应位置画“√”或“×”，当天没有进行作业的项目画“/”。
      </p>
      <p>
        3、出现检验不良时，在异常记录中填写信息，不良品按《不合格品控制程序》处理。
      </p>
    </div>

    <!-- table1 -->
    <el-table
      v-loading="loading"
      :data="tableData"
      style="width: 100%; margin: 30px 0 0 30px">
      <el-table-column prop="inspectionItems" label="检验项目" width="100px">
      </el-table-column>

      <el-table-column prop="inspectionType" label="检验内容" width="700px">
      </el-table-column>

      <el-table-column label="操作" width="250px">
        <template slot-scope="scope">

          <el-radio-group class="radio" v-model="scope.row.radio">
            <el-radio
              v-for="(item, index) in items"
              :key="index"
              :label="item.type"
              :checked="index === current"
              :value="index"
              >{{ item.name }}</el-radio>
          </el-radio-group>
        </template>
      </el-table-column>

      <el-table-column prop="notes" label="备注" width="300px">
      </el-table-column>
    </el-table>

    <!-- table2 -->
    <el-table
      v-loading="loading2"
      :data="projectTable"
      style="width: 100%; margin: 50px 0 0 30px;" >

      <el-table-column prop="inspectionItems" label="检验项目" width="100px">
      </el-table-column>

      <el-table-column prop="inspectionType" label="检验内容" width="450px">
      </el-table-column>

      <el-table-column prop="value8" label="8:30" width="100px">
      </el-table-column>

      <el-table-column prop="value9" label="9:30" width="100px">
      </el-table-column>

      <el-table-column prop="value10" label="10:30" width="100px">
      </el-table-column>

      <el-table-column prop="value11" label="11:30" width="100px">
      </el-table-column>

      <el-table-column prop="value13" label="13:30" width="100px">
      </el-table-column>

      <el-table-column prop="value14" label="14:30" width="100px">
      </el-table-column>

      <el-table-column prop="value15" label="15:30" width="100px">
      </el-table-column>

      <el-table-column prop="value16" label="16:30" width="100px">
      </el-table-column>

      <el-table-column prop="value18" label="18:00" width="100px">
      </el-table-column>

      <el-table-column prop="value19" label="19:00" width="100px">
      </el-table-column>
     
    </el-table>

    <div slot="footer" class="dialog-footer" style="margin:30px 0 0 50%;">
      <el-button @click="reset" style="font-size: 24px;">重 置</el-button>
      <el-button  type="primary" size="small" style="font-size: 24px;" @click="submitForm">提 交</el-button>
    </div>

  </div>
</template>
  
  <script>
export default {
  name: "dailyReport",
  data() {
    return {
      //form
      queryParams: {
        entryName: "HIE112A系列分体落地式直流充电桩",
        model: "HIE110A-060T4-80A750-02",
        entryNo: "1124230810071",
        productionBatch: "",
        productionNumber: "2",
      },
      // table1遮罩层
      loading: false,
      //table2遮罩层
      loading2:false,
      //检验table
      tableData: [
        {
          inspectionItems: "静电防护",
          inspectionType:
            "与PCBA板接触人员是否带静电环或防静电手套，佩戴方式是否正确、有效",
          notes: "螺钉紧固标准:M3:0.5~0.7N.MM4:0.8~1.0N.M",
          radio:0,
          id: 1,
        },
        {
          inspectionItems: "作业规范",
          inspectionType:
            "有无作业指导书，作业人员操作是否规范，流转单上是否检验画勾、签名",
          notes: "螺钉紧固标准:M3:0.5~0.7N.MM4:0.8~1.0N.M",
          radio:1,
          id: 2,
        },
        {
          inspectionItems: "作业规范",
          inspectionType:
            "安装是否都按照装配作业指导书，螺丝紧固画红且扭力符合标准",
          notes: "M5:1.1~1.3N.M   M6:1.6~1.8N.M",
          radio:1,
          id: 3,
        },
        {
          inspectionItems: "设备仪器",
          inspectionType:
            "电批、烙铁，端子压接机等工具是否点检，是否在效验有效期内，设备工装工具运行是否正常，是否佩戴工服手套等劳保用品",
          notes: "M8:10±1 N.M",
          radio:1,
          id: 4,
        },
      ],
      projectTable:[
        {
          inspectionItems: "静电防护",
          inspectionType:
            "与PCBA板接触人员是否带静电环或防静电手套，佩戴方式是否正确、有效",
          notes: "螺钉紧固标准:M3:0.5~0.7N.MM4:0.8~1.0N.M",
          radio:0,
          id: 1,
          value8:"√",
          value9:"√",
          value10:"×"
        },
        {
          inspectionItems: "静电防护",
          inspectionType:
            "与PCBA板接触人员是否带静电环或防静电手套，佩戴方式是否正确、有效",
          notes: "螺钉紧固标准:M3:0.5~0.7N.MM4:0.8~1.0N.M",
          radio:0,
          id: 1,
          value8:"√",
          value9:"√",
          value10:"×"
        },
        {
          inspectionItems: "静电防护",
          inspectionType:
            "与PCBA板接触人员是否带静电环或防静电手套，佩戴方式是否正确、有效",
          notes: "螺钉紧固标准:M3:0.5~0.7N.MM4:0.8~1.0N.M",
          radio:0,
          id: 1,
          value8:"√",
          value9:"√",
          value10:"×"
        },
      ],
      items: [
        {
          type: 0,
          name: "×",
        },
        {
          type: 1,
          name: "√",
        },
        {
          type: 2,
          name: "/",
        },
      ],
      current: "",
    };
  },
  created() {},
  methods: {
    //重置按钮
    reset() {
            // this.form = {
            //     exceptionId: undefined,
            //     a: this.form.a
            // };
            // // this.autoGenFlag = false;
            // this.resetForm("form");
    },
    //提交按钮
    submitForm() {
            // this.$refs["form"].validate(valid => {
            //     let params = {}
            //     params.exceptionId = this.form.exceptionId
            //     params.processName = this.formObj.processName
            //     params.processCode = this.formObj.processCode
            //     params.itemCode = this.formObj.productCode
            //     params.itemName = this.formObj.productName
            //     params.workstationCode = 'WS0102'
            //     params.workorderCode = this.formObj.workorderCode
            //     params.specification = this.formObj.productSpc
            //     if (valid) {
            //         mobSubmit(params).then(res => {
            //             console.log(res, '=======res=======');
            //             this.$modal.msgSuccess(res.msg);


            //         });

            //     }
            // });
    },
  },
};
</script>

<style scoped>
.box {
  margin-left: 30px;
}
</style>

  